<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Insert title here</title>
<style type="text/css">
* {
	margin: 0;
	padding: 0;
	list-style: none;
}

.emp_items {
	width: 200px;
	margin: 5px;
	background-image: url("../../../public/image/lv.png");
	background-color: green;
}

ul {
	display: flex;
	flex-wrap: wrap;
}

a {
	color: black;
	text-decoration: none;
}
</style>
</head>
<body>
	<form action="add">

		<input name="serach" value="" placeholder="输入ID查询" id="serach"> <a
			href="" onclick="getkey(this)">点击搜索</a>
		<a href="http://localhost/tea/all">查看所有</a><br>
		<li class="emp_items">
			<p>ID:${find.id }</p>
			<p>类型:${find.teaType }</p>
			<p>产地:${find.teaAddr }</p>
			<p>品级:${find.teaLevel }</p>
			<p>价格:${find.teaPrice }</p>
			<p>品牌:${find.teaName }</p>
			<p>代言人:${find.teaProxy }</p>
		</li> 
		
		<label for="teaType">类型:</label> <input name="teaType" value="">
		<label for="teaAddr">产地:</label> <input name="teaAddr" value="">
		<label for="teaLevel">品级:</label> <input name="teaLevel" value="">
		<label for="teaPrice">价格:</label> <input name="teaPrice" value="">
		<label for="teaName">品牌:</label> <input name="teaName" value="">
		<label for="teaProxy">代言人:</label> <input name="teaProxy" value="">
		<input type="submit" value="添加">

		<ul>
			<c:forEach items="${teas}" var="e">
				<a href="update_view?eid=${e.id }">
					<li class="emp_items">
						<p>ID:${e.id }</p>
						<p>类型:${e.teaType }</p>
						<p>产地:${e.teaAddr }</p>
						<p>品级:${e.teaLevel }</p>
						<p>价格:${e.teaPrice }</p>
						<p>品牌:${e.teaName }</p>
						<p>代言人:${e.teaProxy }</p>
					</li>
				</a>
				<a href="http://localhost/tea/delete?id=${ e.id}">删除</a>
			</c:forEach>
		</ul>
		
	</form>

</body>
<script type="text/javascript">
	    function getkey(a) {
		var pms = document.getElementById("serach").value;
		a.href = 'http://localhost/tea/finById?eid=' + pms;
	}
</script>
</html>